﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LA6
{
    /// <summary>
    /// Class used to avoid same seed problems with the random number generator.
    /// </summary>
    static class RandomHelper
    {
        /// <summary>
        /// Field used to generate random numbers
        /// </summary>
        static Random rng = new Random();

        // Methods: ----------------------------------------

        /// <summary>
        /// Method used to generate random integer in the given range.
        /// </summary>
        /// <param name="minValue">The inclusive minimum of the range.</param>
        /// <param name="maxValue">The exclusive maximum of the range.</param>
        /// <returns>The random integer generated by the random generator.</returns>
        public static int Next(int minValue, int maxValue)
        {
            // Use the random field to generate the number
            // First parameter inclusive, second parameter exclusive
            return rng.Next(minValue, maxValue);
        }
    }
}
